package cn.datawin.task.util;

import java.util.List;
import java.util.Map;
import cn.datawin.task.Config;


public class TaskUtil {

	public static String addtask(Map<String, String> map) throws Exception{
		return HttpUtil.post(Config.apps.get("url")+"inserttask",map);
	}
	
	public static String updateclient(String workbeach,String tasksize,String count) throws Exception{
		return HttpUtil.getStr(Config.apps.get("url1")+"update?workbeach="+workbeach+"&count="+count+"&tasksize="+tasksize,"UTF-8");
	}

	public static List<Map<String, Object>> gettask(String workbeach, String state) throws Exception{
		return HttpUtil.get(Config.apps.get("url")+"gettask?workbeach="+workbeach+"&state="+state);
	}
	
	public static List<Map<String, Object>> deltask(String id) throws Exception{
		return HttpUtil.get(Config.apps.get("url")+"deletetask?id="+id);
	}
}
